package cn.geoportal.benoserver.mapper;

import cn.geoportal.benoserver.entity.IotType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Entity cn.geoportal.benoserver.entity.IotType
 */
public interface IotTypeMapper extends BaseMapper<IotType> {

    /**
     * 1. 添加IotType
     * @param name
     * @param description
     * @return
     */
    @Select("INSERT INTO t_iot_type(name, description) values(#{name}, #{description}) RETURNING id")
    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    int addIotType(@Param("name") String name, @Param("description") String description);
}




